package cn.com.ddapp.ddm.util;

import android.app.ProgressDialog;
import android.content.Context;

import cn.com.ddapp.ddm.R;


/**
 * Created by Administrator on 2016/6/29.
 */
public class LoadingDialog {
    private static ProgressDialog dialog;
    public static void showDialog(Context context,String message,boolean isCancleable){
       dialog=new ProgressDialog(context, R.style.MyDialogStyle);
       dialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);
        dialog.setCanceledOnTouchOutside(false);
        dialog.setIndeterminate(true);
        dialog.setMessage(message);
        dialog.show();
    }
    public static void clossDialog(){
        if(dialog.isShowing()){
            dialog.dismiss();
            dialog=null;
        }
    }
}
